package com.woniuxy.controller;

import com.woniuxy.entity.RbacMenu;
import com.woniuxy.entity.ResponseEntity;
import com.woniuxy.service.RbacMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: 马宇航
 * @Todo: 菜单控制器
 * @DateTime: 22/09/09/0009 11:09
 * @Component: 成都蜗牛学苑
 **/
@RestController
@RequestMapping("/rbacMenu")
public class RbacMenuController {
    @Autowired
    RbacMenuService rbacMenuServicel;
    @GetMapping("/")
    public ResponseEntity findAllMenu(){
        return rbacMenuServicel.findAllMenu();
    }
    @PutMapping("/")
    public ResponseEntity editOne(@RequestBody RbacMenu rbacMenu){
        return rbacMenuServicel.editOne(rbacMenu);
    }
    @PutMapping("/{id}/{fid}")
    public ResponseEntity updateMenu(@PathVariable int id,@PathVariable Integer fid){
        return rbacMenuServicel.updateMenu(id,fid);
    }
}
